// Copyright (c) 2022, hzmes and contributors
// For license information, please see license.txt

frappe.ui.form.on('Get From ERP', {
	refresh: function(frm) {
		frm.add_custom_button('从ERP获取', () => {
			frm.call({
				method: 'srm.srm.doctype.srm_server_config.srm_server_config.get_material_from_erp',
				args: { material_number: cur_frm.doc.number },
				callback: function(r) {
					frappe.msgprint(r.message)
				}
			})
		});
	}
});
